package com.easylive.entity.enums;

public enum UserActionTypeEnum {
    COMMENT_LIKE(0,"like_count","评论喜欢点赞"),
    COMMENT_HATE(1,"hate_count","评论踩"),
    VIDEO_LIKE(2,"like_count","视频点赞"),
    VIDEO_COLLECT(3,"collect_count","视频收藏"),
    VIDEO_COMMENT(6,"comment_count","视频评论"),
    VIDEO_PLAY(5,"play_count","视频播放数"),
    VIDEO_COIN(4,"coin_count","视频投币数"),
    VIDEO_DANMU(7,"danmu_count","视频弹幕");
    private Integer type;
    private String field;
    private String desc;
    private UserActionTypeEnum(Integer type,String field,String desc){
        this.type=type;
        this.field=field;
        this.desc=desc;
    }
    public Integer getType(){
        return type;
    }
    public String getField(){
        return field;
    }
    public String getDesc(){
        return desc;
    }
    public static UserActionTypeEnum getByType(Integer type){
        for(UserActionTypeEnum userActionTypeEnum:UserActionTypeEnum.values()){
            if(userActionTypeEnum.getType().equals(type)){
                return userActionTypeEnum;
            }
        }
        return null;
    }
}
